package com.jumi.microservice.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jumi.microservice.common.base.dto.ResponseResult;
import com.jumi.microservice.service.IJmPromoterCheckLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 要挑客户管理团队
 * @since 2020-08-19
 */
@RestController
@RequestMapping("/jm-promoter-check-log")
@Transactional
@Api(value = "金牌推广商审核日志", tags = {"金牌推广商审核日志"})
public class JmPromoterCheckLogController {
    @Autowired
    IJmPromoterCheckLogService logService;


    @GetMapping("/getList")
    @ApiOperation("金牌推广商日志分页")
    public ResponseResult getList(@RequestParam("uid") Integer uid) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("member_id", uid);
        wrapper.orderByDesc("add_time");
        return ResponseResult.success(logService.list(wrapper));
    }
}
